package com.cndw.kungfu.vo.rankingvo;

public class AbstractRankingVO<T extends AbstractRankingVO<?>> implements Comparable<T> {

	/**
	 * 排名
	 */
	protected int ranking;

	public int getRanking() {
		return ranking;
	}

	public void setRanking(int ranking) {
		this.ranking = ranking;
	}

	@Override
	public int compareTo(T o) {
		if (this.getRanking() > o.getRanking()) {
			return 1;
		} else if (this.getRanking() < o.getRanking()) {
			return -1;
		} else {
			return 0;
		}
	}
}
